/**
 * 
 */
package com.xb.demo1.iterator;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @author kexue
 *
 */
public class TestMain {

	private static Logger logger = LoggerFactory.getLogger(TestMain.class);

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		BookShelf sBookShelf = new BookShelf();
		sBookShelf.add(new Book("时间简史", "霍金"));
		sBookShelf.add(new Book("Java 编程思想(Thinking in Java)", "Bruce Eckel"));
		sBookShelf.add(new Book("围城", "沈从文"));
		sBookShelf.add(new Book("红高粱", "莫言"));

		Iterator<Book> iterator = sBookShelf.iterator();

		while (iterator.hasNext()) {
			Book next = iterator.next();
			logger.info(next.toString());
		}
	}

}
